package br.ufmg.dcc.vod.remoteworkers.util;

import java.util.concurrent.Semaphore;

public class SemaphorePostRaceWaitCommand extends RaceConditionCommand {

	private final Semaphore semaphore;

	public SemaphorePostRaceWaitCommand(Semaphore semaphore) {
		this.semaphore = semaphore;
	}
	
	@Override
	public Integer process() throws Exception {
		Integer process = super.process();
		semaphore.release();
		return process;
	}
}